package com.iqik.sharding.repository;

import com.iqik.sharding.pojo.PositionDetail;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

public interface PositionDetailRepository extends JpaRepository<PositionDetail, Long> {


    @Query(nativeQuery = true, value = "select p.id, p.name, p.salary, p.city, pd.description from position p join position_detail pd on(p.id=pd.pid) where p.id=:id")
    Object findPositionDetailById(@Param("id") long id);
}
